use crate::cljcell::clj_cell::CljCell;
use crate::built_in_functions::my_clojure_interp::{CljFunc, CljRecur, MyClojureInterp, CljFuncParam, CljFuncParamList, MyCljFunc, MyFuncHs, MyCljRecur};
use crate::built_in_functions::util::my_util;
use std::collections::HashMap;
use std::fmt;
use std::rc::Rc;
use std::cell::RefCell;
use chrono::NaiveDate;

pub struct MyLogic;

impl MyLogic {

    /**
     * cond 计算
     * */
    pub fn clj_list_cond(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        // cond 计算
        if lst.len() > 1 && lst.len() % 2 > 0 {
            let mut i = 1;
            loop {
                if lst.len() > i + 1 {
                    //let c: Rc<CljCell> = lst[i].clone();
                    match &*lst[i] {
                        CljCell::CljList(vs_lst) => {
                            let rs1 = interp.eval(&lst[i], func_hs, clj_recur, rs.clone());
                            if let CljCell::BooleanClj(bvs) = *rs1 {
                                if bvs {
                                    return interp.eval(&lst[i + 1], func_hs, clj_recur, rs.clone());
                                }
                            }
                        },
                        CljCell::BooleanClj(bvs1) => {
                            if *bvs1 {
                                return interp.eval(&lst[i + 1], func_hs, clj_recur, rs.clone());
                            }
                        },
                        CljCell::ElseClj => {
                            return interp.eval(&lst[i + 1], func_hs, clj_recur, rs.clone());
                        },
                        _ => {}
                    }
                } else {
                    break;
                }
                i += 2;
            }
        }
        return Rc::new(CljCell::Null);
    }

    /**
     * if 计算
     * */
    pub fn clj_list_if(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {

        // if 计算
        if lst.len() == 3 {
            match &*lst[1] {
                CljCell::CljList(vs_lst) => {
                    let rs1 = interp.eval(&lst[1], func_hs, clj_recur, rs.clone());
                    //println!("22 {:?}", &lst[2]);
                    if let CljCell::BooleanClj(bvs) = *rs1 {
                        if bvs {
                            return interp.eval(&lst[2], func_hs, clj_recur, rs.clone());
                        }
                    }
                },
                CljCell::BooleanClj(bvs1) => {
                    if *bvs1 {
                        return interp.eval(&lst[2], func_hs, clj_recur, rs.clone());
                    }
                },
                _ => {},
            }
        } else if lst.len() == 4 {
            match &*lst[1] {
                CljCell::CljList(vs_lst) => {
                    let rs1 = interp.eval(&lst[1], func_hs, clj_recur, rs.clone());
                    if let CljCell::BooleanClj(bvs) = *rs1 {
                        if bvs {
                            return interp.eval(&lst[2], func_hs, clj_recur, rs.clone());
                        } else {
                            return interp.eval(&lst[3], func_hs, clj_recur, rs.clone());
                        }
                    }
                },
                CljCell::BooleanClj(bvs1) => {
                    if *bvs1 {
                        return interp.eval(&lst[2], func_hs, clj_recur, rs.clone());
                    } else {
                        return interp.eval(&lst[3], func_hs, clj_recur, rs.clone());
                    }
                },
                _ => {},
            }
        }
        return Rc::new(CljCell::Null);
    }

    /**
     * and
     * */
    pub fn clj_list_and(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        // (and () ())
        let mut myrs = true;
        if lst.len() > 1 {
            for i in 1..lst.len() {
                match &*lst[i] {
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&lst[i], func_hs, clj_recur, rs.clone());
                        if let CljCell::BooleanClj(bvs) = *rs1 {
                            if bvs == false {
                                myrs = false;
                            }
                        }
                    },
                    CljCell::BooleanClj(bvs1) => {
                        if *bvs1 == false {
                            myrs = false;
                        }
                    },
                    _ => {},
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(myrs));
    }

    /**
     * or
     * */
    pub fn clj_list_or(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        // (or () ())
        if lst.len() > 1 {
            for i in 1..lst.len() {
                match &*lst[i] {
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&lst[i], func_hs, clj_recur, rs.clone());
                        if let CljCell::BooleanClj(bvs) = *rs1 {
                            if bvs == true {
                                return Rc::new(CljCell::BooleanClj(true));
                            }
                        }
                    },
                    CljCell::BooleanClj(bvs1) => {
                        if *bvs1 == true {
                            return Rc::new(CljCell::BooleanClj(true));
                        }
                    },
                    _ => {},
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(false));
    }

    /**
     * 相等
     */
    fn equals(interp: &MyClojureInterp, tmp: Rc<CljCell>, a: Rc<CljCell>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Vec<Rc<CljCell>> {
        match &*tmp {
            // bool 类型
            CljCell::BooleanClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::BooleanClj(vs1) => {
                        if vs == vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::BooleanClj(bvs) = *rs1 {
                            if vs == &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::BooleanClj(bvs) = &**rccell {
                            if vs == bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::BooleanClj(bvs) = &**rccell {
                            if vs == bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // long 类型
            CljCell::LongClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if vs == vs1 {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::LongClj(bvs) = *rs1 {
                            if vs == &bvs {
                                //brs = true;
                                //tmp = rs1;
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // double 类型
            CljCell::DoubleClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DoubleClj(vs1) => {
                        if vs == vs1 {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DoubleClj(bvs) = *rs1 {
                            if vs == &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // int 类型
            CljCell::IntClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::IntClj(vs1) => {
                        if vs == vs1 {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::IntClj(bvs) = &*rs1 {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rs1;
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // float 类型
            CljCell::FloatClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::FloatClj(vs1) => {
                        if vs == vs1 {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::FloatClj(bvs) = &*rs1 {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rs1;
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs == bvs {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // String 类型
            CljCell::StringClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::StringClj(vs1) => {
                        if Rc::as_ref(vs) == Rc::as_ref(vs1) {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::StringClj(bvs) = &*rs1 {
                            if Rc::as_ref(vs) == Rc::as_ref(&bvs) {
                                //brs = true;
                                //tmp = rs1;
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::StringClj(bvs) = &**rccell {
                            if Rc::as_ref(vs) == Rc::as_ref(&bvs) {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::StringClj(bvs) = &**rccell {
                            if Rc::as_ref(vs) == Rc::as_ref(&bvs) {
                                //brs = true;
                                //tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // NaiveDate 类型
            CljCell::DateClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DateClj(vs1) => {
                        if vs == vs1 {
                            //brs = true;
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DateClj(bvs) = &*rs1 {
                            if vs == bvs {
                                // brs = true;
                                // tmp = rs1;
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs == bvs {
                                // brs = true;
                                // tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs == bvs {
                                // brs = true;
                                // tmp = rccell.clone();
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // symbol 类型
            CljCell::Symbol(sym_name) => {
                //let fhs = func_hs.borrow();
                let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                let vrs:Vec<Rc<CljCell>> = MyLogic::equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            // percent 类型
            CljCell::Percent(per) => {
                //let fhs = func_hs.borrow();
                let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                let line: &String = &cell_key.to_string();
                let rccell: &Rc<CljCell> = func_hs.get(line);
                let vrs:Vec<Rc<CljCell>> = MyLogic::equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            _ => {},
        }
        return vec![Rc::new(CljCell::BooleanClj(false))];
    }

    /**
     * 大于
     */
    fn greater_than(interp: &MyClojureInterp, tmp: Rc<CljCell>, a: Rc<CljCell>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Vec<Rc<CljCell>> {
        match &*tmp {
            // long 类型
            CljCell::LongClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if vs > vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs > (*vs1 as i64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::LongClj(bvs) = *rs1 {
                            if vs > &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // double 类型
            CljCell::DoubleClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if *vs > (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if vs > vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if *vs > (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs > (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DoubleClj(bvs) = *rs1 {
                            if vs > &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // int 类型
            CljCell::IntClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as i64) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if vs > vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::IntClj(bvs) = &*rs1 {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // float 类型
            CljCell::FloatClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as f64) > (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) > *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if vs > vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs > (*vs1 as f32) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::FloatClj(bvs) = &*rs1 {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // NaiveDate 类型
            CljCell::DateClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DateClj(vs1) => {
                        if vs > vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DateClj(bvs) = &*rs1 {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // symbol 类型
            CljCell::Symbol(sym_name) => {

                let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_than(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            // percent 类型
            CljCell::Percent(per) => {
                let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                let line: &String = &cell_key.to_string();
                let rccell: &Rc<CljCell> = func_hs.get(line);

                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_than(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            _ => {},
        }
        return vec![Rc::new(CljCell::BooleanClj(false))];
    }

    /**
     * 大于
     */
    fn less_than(interp: &MyClojureInterp, tmp: Rc<CljCell>, a: Rc<CljCell>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Vec<Rc<CljCell>> {
        match &*tmp {
            // long 类型
            CljCell::LongClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if vs < vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs < (*vs1 as i64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::LongClj(bvs) = *rs1 {
                            if vs < &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // double 类型
            CljCell::DoubleClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if *vs < (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if vs < vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if *vs < (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs < (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DoubleClj(bvs) = *rs1 {
                            if vs < &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // int 类型
            CljCell::IntClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as i64) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if vs < vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::IntClj(bvs) = &*rs1 {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // float 类型
            CljCell::FloatClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as f64) < (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) < *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if vs < vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs < (*vs1 as f32) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::FloatClj(bvs) = &*rs1 {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // NaiveDate 类型
            CljCell::DateClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DateClj(vs1) => {
                        if vs < vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DateClj(bvs) = &*rs1 {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs < bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // symbol 类型
            CljCell::Symbol(sym_name) => {
                //let fhs = func_hs.borrow();
                let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_than(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            // percent 类型
            CljCell::Percent(per) => {
                //let fhs = func_hs.borrow();
                let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                let line: &String = &cell_key.to_string();
                let rccell: &Rc<CljCell> = func_hs.get(line);
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_than(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            _ => {},
        }
        return vec![Rc::new(CljCell::BooleanClj(false))];
    }

    /**
     * 大于
     */
    fn greater_equals(interp: &MyClojureInterp, tmp: Rc<CljCell>, a: Rc<CljCell>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Vec<Rc<CljCell>> {
        match &*tmp {
            // long 类型
            CljCell::LongClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if vs >= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs >= (*vs1 as i64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::LongClj(bvs) = *rs1 {
                            if vs >= &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                       //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // double 类型
            CljCell::DoubleClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if *vs >= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if vs >= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if *vs >= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs >= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DoubleClj(bvs) = *rs1 {
                            if vs >= &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // int 类型
            CljCell::IntClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as i64) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if vs >= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::IntClj(bvs) = &*rs1 {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // float 类型
            CljCell::FloatClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as f64) >= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) >= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if vs >= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs >= (*vs1 as f32) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::FloatClj(bvs) = &*rs1 {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs > bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // NaiveDate 类型
            CljCell::DateClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DateClj(vs1) => {
                        if vs >= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DateClj(bvs) = &*rs1 {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs >= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // symbol 类型
            CljCell::Symbol(sym_name) => {
                //let fhs = func_hs.borrow();
                let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            // percent 类型
            CljCell::Percent(per) => {
                //let fhs = func_hs.borrow();
                let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                let line: &String = &cell_key.to_string();
                let rccell: &Rc<CljCell> = func_hs.get(line);
                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            _ => {},
        }
        return vec![Rc::new(CljCell::BooleanClj(false))];
    }

    /**
     * 大于
     */
    fn less_equals(interp: &MyClojureInterp, tmp: Rc<CljCell>, a: Rc<CljCell>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Vec<Rc<CljCell>> {
        match &*tmp {
            // long 类型
            CljCell::LongClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if vs <= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs <= (*vs1 as i64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::LongClj(bvs) = *rs1 {
                            if vs <= &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::LongClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // double 类型
            CljCell::DoubleClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if *vs <= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if vs <= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if *vs <= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs <= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DoubleClj(bvs) = *rs1 {
                            if vs <= &bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DoubleClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // int 类型
            CljCell::IntClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as i64) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if (*vs as f32) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if vs <= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::IntClj(bvs) = &*rs1 {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::IntClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // float 类型
            CljCell::FloatClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::LongClj(vs1) => {
                        if (*vs as f64) <= (*vs1 as f64) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::DoubleClj(vs1) => {
                        if (*vs as f64) <= *vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::FloatClj(vs1) => {
                        if vs <= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::IntClj(vs1) => {
                        if *vs <= (*vs1 as f32) {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::FloatClj(bvs) = &*rs1 {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::FloatClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // NaiveDate 类型
            CljCell::DateClj(vs) => {
                match &*a /* &*lst[i] */ {
                    CljCell::DateClj(vs1) => {
                        if vs <= vs1 {
                            return vec![Rc::new(CljCell::BooleanClj(true))];
                        }
                    },
                    CljCell::CljList(vs_lst) => {
                        let rs1 = interp.eval(&a, func_hs, clj_recur, rs.clone());
                        if let CljCell::DateClj(bvs) = &*rs1 {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rs1];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // symbol 类型
                    CljCell::Symbol(sym_name) => {
                        //let fhs = func_hs.borrow();
                        let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    // percent 类型
                    CljCell::Percent(per) => {
                        //let fhs = func_hs.borrow();
                        let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                        let line: &String = &cell_key.to_string();
                        let rccell: &Rc<CljCell> = func_hs.get(line);
                        if let CljCell::DateClj(bvs) = &**rccell {
                            if vs <= bvs {
                                return vec![Rc::new(CljCell::BooleanClj(true)), rccell.clone()];
                            }
                            // 因为数据类型不一样，抛出异常
                        }
                    },
                    _ => {
                        // 因为数据类型不一样，抛出异常
                    },
                }
            },
            // symbol 类型
            CljCell::Symbol(sym_name) => {
                //let fhs = func_hs.borrow();
                let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            // percent 类型
            CljCell::Percent(per) => {
                //let fhs = func_hs.borrow();
                let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                let line: &String = &cell_key.to_string();
                let rccell: &Rc<CljCell> = func_hs.get(line);
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_equals(interp, rccell.clone(), a, func_hs, clj_recur, rs);
                return vrs;
            },
            _ => {},
        }
        return vec![Rc::new(CljCell::BooleanClj(false))];
    }

    /**
     * 等于
     * */
    pub fn clj_list_equals(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        // (= () ())
        let mut brs = true;
        if lst.len() > 1 {
            let mut tmp: Rc<CljCell> = lst[1].clone();
            for i in 2..lst.len() {
                let vrs:Vec<Rc<CljCell>> = MyLogic::equals(interp, tmp.clone(), lst[i].clone(), func_hs, clj_recur, rs.clone());
                if vrs.len() == 2 {
                    tmp = vrs[1].clone();
                } else {
                    if let CljCell::BooleanClj(bvs) = *vrs[0] {
                        if bvs == false {
                            return Rc::new(CljCell::BooleanClj(false));
                        }
                    }
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(brs));
    }

    /**
     * 大于 只有数值类型、日期类型才能比大小
     * */
    pub fn clj_list_greater_than(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        let mut brs = true;
        if lst.len() > 1 {
            let mut tmp: Rc<CljCell> = lst[1].clone();
            for i in 2..lst.len() {
                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_than(interp, tmp.clone(), lst[i].clone(), func_hs, clj_recur, rs.clone());
                if vrs.len() == 2 {
                    tmp = vrs[1].clone();
                } else {
                    if let CljCell::BooleanClj(bvs) = *vrs[0] {
                        if bvs == false {
                            return Rc::new(CljCell::BooleanClj(false));
                        }
                    }
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(brs));
    }

    /**
     * 小于 只有数值类型、日期类型才能比大小
     * */
    pub fn clj_list_less_than(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        let brs = true;
        if lst.len() > 1 {
            let mut tmp: Rc<CljCell> = lst[1].clone();
            for i in 2..lst.len() {
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_than(interp, tmp.clone(), lst[i].clone(), func_hs, clj_recur, rs.clone());
                if vrs.len() == 2 {
                    tmp = vrs[1].clone();
                } else {
                    if let CljCell::BooleanClj(bvs) = *vrs[0] {
                        if bvs == false {
                            return Rc::new(CljCell::BooleanClj(false));
                        }
                    }
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(brs));
    }

    /**
     * 大于等于 只有数值类型、日期类型才能比大小
     * */
    pub fn clj_list_greater_equals(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        let mut brs = true;
        if lst.len() > 1 {
            let mut tmp: Rc<CljCell> = lst[1].clone();
            for i in 2..lst.len() {
                let vrs:Vec<Rc<CljCell>> = MyLogic::greater_equals(interp, tmp.clone(), lst[i].clone(), func_hs, clj_recur, rs.clone());
                if vrs.len() == 2 {
                    tmp = vrs[1].clone();
                } else {
                    if let CljCell::BooleanClj(bvs) = *vrs[0] {
                        if bvs == false {
                            return Rc::new(CljCell::BooleanClj(false));
                        }
                    }
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(brs));
    }

    /**
     * 小于等于 只有数值类型、日期类型才能比大小
     * */
    pub fn clj_list_less_equals(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        let mut brs = true;
        if lst.len() > 1 {
            let mut tmp: Rc<CljCell> = lst[1].clone();
            for i in 2..lst.len() {
                let vrs:Vec<Rc<CljCell>> = MyLogic::less_equals(interp, tmp.clone(), lst[i].clone(), func_hs, clj_recur, rs.clone());
                if vrs.len() == 2 {
                    tmp = vrs[1].clone();
                } else {
                    if let CljCell::BooleanClj(bvs) = *vrs[0] {
                        if bvs == false {
                            return Rc::new(CljCell::BooleanClj(false));
                        }
                    }
                }
            }
        }
        return Rc::new(CljCell::BooleanClj(brs));
    }

    /**
     * not 语句
     * */
    pub fn clj_list_not(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        //let mut myrs = true;
        if lst.len() == 2 {
            let tmp: &Rc<CljCell> = &lst[1];
            match &**tmp {
                CljCell::BooleanClj(vs) => {
                    if *vs == true {
                        return Rc::new(CljCell::BooleanClj(false));
                    } else {
                        return Rc::new(CljCell::BooleanClj(true));
                    }
                },
                // symbol 类型
                CljCell::Symbol(sym_name) => {
                    //let fhs = func_hs.borrow();
                    let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());

                    if let CljCell::BooleanClj(bvs) = &**rccell {
                        if *bvs == true {
                            return Rc::new(CljCell::BooleanClj(false));
                        } else {
                            return Rc::new(CljCell::BooleanClj(true));
                        }
                        // 因为数据类型不一样，抛出异常
                    }
                },
                // percent 类型
                CljCell::Percent(per) => {
                    //let fhs = func_hs.borrow();
                    let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                    let line: &String = &cell_key.to_string();
                    let rccell: &Rc<CljCell> = func_hs.get(line);
                    if let CljCell::BooleanClj(bvs) = &**rccell {
                        if *bvs == true {
                            return Rc::new(CljCell::BooleanClj(false));
                        } else {
                            return Rc::new(CljCell::BooleanClj(true));
                        }
                        // 因为数据类型不一样，抛出异常
                    }
                },
                CljCell::CljList(vs) => {
                    let rs1 = (*interp).clj_list(vs, func_hs, clj_recur, rs.clone());
                    if let CljCell::BooleanClj(bvs) = &*rs1 {
                        if *bvs == true {
                            return Rc::new(CljCell::BooleanClj(false));
                        } else {
                            return Rc::new(CljCell::BooleanClj(true));
                        }
                        // 因为数据类型不一样，抛出异常
                    }
                },
                _ => {},
            }
        }
        return Rc::new(CljCell::Null);
    }

    /**
     * nil? 语句
     * */
    pub fn clj_list_is_nil(interp: &MyClojureInterp, lst: &Vec<Rc<CljCell>>, func_hs: &MyFuncHs, clj_recur: &MyCljRecur, rs: Rc<CljCell>) -> Rc<CljCell> {
        if lst.len() == 2 {
            let tmp: &Rc<CljCell> = &lst[1];
            match &**tmp {
                CljCell::Nil => {
                    return Rc::new(CljCell::BooleanClj(true));
                },
                CljCell::Null => {
                    return Rc::new(CljCell::BooleanClj(true));
                },
                // symbol 类型
                CljCell::Symbol(sym_name) => {
                    //let fhs = func_hs.borrow();
                    let rccell: &Rc<CljCell> = func_hs.get(sym_name.as_ref());
                    match &**rccell {
                        CljCell::Null => return Rc::new(CljCell::BooleanClj(true)),
                        CljCell::Nil => return Rc::new(CljCell::BooleanClj(true)),
                        _ => return Rc::new(CljCell::BooleanClj(false))
                    }
                    // if let CljCell::Nil = &**rccell {
                    //     return Rc::new(CljCell::BooleanClj(true));
                    //     // 因为数据类型不一样，抛出异常
                    // } else {
                    //     return Rc::new(CljCell::BooleanClj(false));
                    // }
                },
                // percent 类型
                CljCell::Percent(per) => {
                    //let fhs = func_hs.borrow();
                    let cell_key: &Box<CljCell> = per.as_ref().unwrap();
                    let line: &String = &cell_key.to_string();
                    let rccell: &Rc<CljCell> = func_hs.get(line);
                    match &**rccell {
                        CljCell::Null => return Rc::new(CljCell::BooleanClj(true)),
                        CljCell::Nil => return Rc::new(CljCell::BooleanClj(true)),
                        _ => return Rc::new(CljCell::BooleanClj(false))
                    }
                    // if let CljCell::Nil = &**rccell {
                    //     return Rc::new(CljCell::BooleanClj(true));
                    //     // 因为数据类型不一样，抛出异常
                    // } else {
                    //     return Rc::new(CljCell::BooleanClj(false));
                    // }
                },
                CljCell::CljList(vs) => {
                    let rs1 = (*interp).clj_list(vs, func_hs, clj_recur, rs.clone());
                    match &*rs1 {
                        CljCell::Null => return Rc::new(CljCell::BooleanClj(true)),
                        CljCell::Nil => return Rc::new(CljCell::BooleanClj(true)),
                        _ => return Rc::new(CljCell::BooleanClj(false))
                    }
                },
                _ => {},
            }
        }
        return Rc::new(CljCell::Null);
    }
}




















































